print("_name__ ===", __name__)


def generate_num():
    x = yield
    print("1.会执行到这里吗")
    while True:
        print("2.while_会执行到这里吗")
        x = yield x * 2


gen = generate_num()

# 启动生成器，使其运行到第一个yield表达式处并暂停
next(gen)  # 启动生成器

res1 = gen.send(10)

print("res1=", res1)
